package wk.utils.dao;

import org.apache.ibatis.annotations.Param;

import java.sql.SQLException;
import java.util.List;
import java.util.Set;

/**
 * 定义公共接口方法
 * @param <K> 表示主键
 * @param <V> 表示对象
 */
public interface IDAO<K,V> {
    public boolean doCreate(V vo)throws SQLException;
    public boolean doUpdate(V vo)throws SQLException;
    public boolean doRemove(Set<K> ids)throws SQLException;
    public V findById(K id)throws SQLException;
    public List<V> findAll()throws SQLException;
    public List<V> findBySplit(@Param("start") int currentPage, @Param("lineSize") int lineSize)throws SQLException;
    public int getAllCount()throws SQLException;
}
